
#ifndef H_C_PAIR_H
#define H_C_PAIR_H

#include "ctypes.h"

typedef struct tagSPair{
	size_t        szFirstTypeSize;
	size_t        szSecondTypeSize;
	void*         first;
	void*         second;	
	PFCompare     pfnFirstCompare;
	//PFCompare     pfnSecondCompare;
}SPair, *PSPair;

#define PairCreate( firsttype, secondtype )\
	    StlcPairCreate(	sizeof( firsttype ), #firsttype, sizeof( secondtype ), #secondtype )
#ifdef __cplusplus
extern "C" {
#endif

STLCDLL_EXPORTS SPair StlcPairCreate( size_t a_szFirstTypeSize, const char* a_pcFirstTypeName, size_t a_szSecondTypeSize, const char* a_pcSecondTypeName );
STLCDLL_EXPORTS void  StlcPairInit( PSPair a_pstPair, PFCompare a_pfnCompFirst, PFCompare a_pfnCompSecond );

STLCDLL_EXPORTS bool  StlcPairSameType( const SPair* a_pstPairFirst, const SPair* a_pstPairSecond );

STLCDLL_EXPORTS void  StlcPairSet( PSPair a_pstPair, const void* a_pFirst, const void* a_pSecond );
STLCDLL_EXPORTS void  StlcPairDestroy( void* a_pPair );

#ifdef __cplusplus
}
#endif

#endif